package com.example.appointment.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.example.appointment.R;
import com.example.appointment.adapter.FeedBackPhotoAdapter;
import com.example.appointment.meta.ProvincesBean;

import org.litepal.crud.DataSupport;

import java.util.ArrayList;

import butterknife.Bind;

/**
 * 意见反馈的界面
 */
public class FeedBackActivity extends BaseActivity {
    //照片的list
    @Bind(R.id.activity_photolist)
    RecyclerView activityphotolist;
    private FeedBackPhotoAdapter adapter;

    private ArrayList<String> pahtlist;//路径的列表
    private Handler mHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            switch (msg.what) {

            }
        }
    };

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK) {
            switch (requestCode) {
                case 0x111:
                    break;
            }
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setnotificationColore(R.color.maincolor);//設置导航栏顔色
        setContentView(R.layout.activity_feedback);

        initView();

    }

    /**
     *
     */
    private void initView() {
        setTitile("意见反馈");
        final GridLayoutManager layoutManager = new GridLayoutManager(this, 4);
        activityphotolist.setLayoutManager(layoutManager);
        adapter = new FeedBackPhotoAdapter(FeedBackActivity.this, mHandler);
        ArrayList<ProvincesBean> provincesbean = (ArrayList<ProvincesBean>) DataSupport.findAll(ProvincesBean.class);
        pahtlist = new ArrayList<String>();
        pahtlist.add("1");
        pahtlist.add("1");
        pahtlist.add("1");
        pahtlist.add("1");
        pahtlist.add("1");
        pahtlist.add("1");
        pahtlist.add("1");

        adapter.setArrayList(pahtlist);
        activityphotolist.setAdapter(adapter);
    }


}
